@extends('layouts.default')
@section('content')
	@if(empty($locations))
	<p>No hay lugares para mostrar.</p>
	@else
	<table class="table" id="locations-table">
		<thead>
			<tr>
				<th>Descripción</th>
				<th colspan="4">Acciones</th>
			</tr>
		</thead>
		<tbody>
	     @foreach($locations as $location)
	     	<tr id="{{$location->pk}}">
	     		<td>{{$location->description}}</td>
	     		<td><a class="btn more" href="#">Más</a></td>
	     		<td><a class="btn items" href="#">Items ({{$location->items->count()}})</a></td>
	     		<td><a class="btn edit" href="#">Editar</a></td>
	     		<td><a class="btn delete" href="#">Borrar</a></td>
	     	</tr>
	     @endforeach
     	</tbody>
     </table>
     @endif
     <div class="location-options">
     	<a href="#" class="btn create">Agregar nuevo lugar</a>
     </div>
     {{ HTML::style('css/popup.css'); }}
     <script type="text/javascript" src="js/Locations.js"></script>
@stop